$(function () {
    $('.am-header-title').text('服装设计师档案简绍');
    var id=$('#designerId').val();
    var url="/dsmdDesigner/getDsmdDesignerDetialById?id="+id;

    $.get(url, function (result) {
        //Handlebar
        var myTemplate = Handlebars.compile($("#designer-detail").html());
        var id='#designerDetail';
        $(id).append(myTemplate(result));

        var myTemplate = Handlebars.compile($("#designer-img").html());
        var id='#designerImg';
        $(id).append(myTemplate(result));

        //alert(result.worksImgList);
        //alert(designerWorksList);
        var myTemplate = Handlebars.compile($("#designer-works").html());
        var id='#designerWorksList';
        $(id).append(myTemplate(result));
        $('.am-slider').flexslider();
    });

});

function appointment(){
    var id=$('#designerId').val();
    var type=$('#type').val();
    location.href="dsmd-appointment.jsp?id="+id+"&type="+type;
}

function back(){
    var active=$("#type").val();
    location.href="dsmd.jsp?active="+active;
}
